//
//  PhoneValidator.m
//  liangyi
//
//  Created by 张水 on 16/12/19.
//  Copyright © 2016年 yswh. All rights reserved.
//

#import "PhoneValidator.h"

@implementation PhoneValidator


- (BOOL)validateInput:(UITextField *)input {
    if (![CommonMethod checkUserInput:input.text]) {
        self.errorMessage = @"手机号码不能为空";
    }else if (![CommonMethod checkTel:input.text]) {
        self.errorMessage = @"手机号码格式错误";
    }else {
        self.errorMessage = nil;
    }
    return  self.errorMessage == nil ? YES:NO;
}


@end
